package org.pcorp.battlespace.modele;

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlRootElement(name = "element")
@XmlType(propOrder = { "id", "nom", "coord", "code", "actif", "value"})
public class Element implements IntItem {
	protected long id;
	protected String nom;
	protected Coordonne coord;
	protected String code;
	protected boolean actif;
	protected double value;
	protected boolean update;
	
	public String getCode() {
		return code;
	}

	public Element(long id, String nom, String code) {
		super();
		this.id = id;
		this.nom = nom;
		this.code = code;
		this.update = false;
	}
	
	public void setCode(String code) {
		this.code = code;
	}

	public Element() {
	
	}
	
	public Element(long id, String nom) {
		super();
		this.id = id;
		this.nom = nom;
	}

	public Element(long id, String nom, Coordonne coord) {
		super();
		this.id = id;
		this.nom = nom;
		this.coord = coord;
	}

	public long getId() {
		return id;
	}
	
	public void setId(long id) {
		this.id = id;
	}
	
	public String getNom() {
		return nom;
	}
	
	public void setNom(String nom) {
		this.nom = nom;
	}
	
	public Coordonne getCoord() {
		return coord;
	}
	
	public void setCoord(Coordonne coord) {
		this.coord = coord;
	}

	public String getLabel() {
		return nom;
	}

	public boolean isActif() {
		return actif;
	}

	public boolean getActif() {
		return actif;
	}
	
	public void setActif(boolean actif) {
		this.actif = actif;
	}

	public double getValue() {
		return value;
	}

	public void setValue(double value) {
		this.value = value;
	}

	@Override
	public boolean isUpdate() {
		return this.update;
	}

	public void setUpdate(boolean update) {
		this.update = update;
	}
}
